package Ch15;

import java.util.ArrayList;
import java.util.Iterator;

public class IteratorEx1 {

	public static void main(String[] args) {
		ArrayList<String> list =
				new ArrayList<String>();
		for(int i = 0; i < 10; i++){
			
		list.add("aaa" + i);
	}
	Iterator<String> it = list.iterator();
	while(it.hasNext()){
		String str = it.next();
		System.out.println(str);
	}
}
}
